package top.kaoshanji.s1ch08d.services;

import org.springframework.stereotype.Service;
import top.kaoshanji.s1ch08d.model.Product;

import java.util.ArrayList;
import java.util.List;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/4/29 18:29
 */
@Service
public class ProductService {

    private List<Product> productList = new ArrayList<>();

    public void addProduct(Product product) {
        productList.add(product);
    }

    public List<Product> findAll() {
        return productList;
    }

}
